3.516 \(\int \cos ^4(c+d x) (a+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=65 \[ \frac{a \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac{3 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac{3 a x}{8}-\frac{b \cos ^4(c+d x)}{4 d} \]

[Out]

(3*a*x)/8 - (b*Cos[c + d*x]^4)/(4*d) + (3*a*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*Cos[c + d*x]^3*Sin[c + d*x])
/(4*d)

________________________________________________________________________________________

Rubi [A]  time = 0.040945, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {3486, 2635, 8} \[ \frac{a \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac{3 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac{3 a x}{8}-\frac{b \cos ^4(c+d x)}{4 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4*(a + b*Tan[c + d*x]),x]

[Out]

(3*a*x)/8 - (b*Cos[c + d*x]^4)/(4*d) + (3*a*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*Cos[c + d*x]^3*Sin[c + d*x])
/(4*d)

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \cos ^4(c+d x) (a+b \tan (c+d x)) \, dx &=-\frac{b \cos ^4(c+d x)}{4 d}+a \int \cos ^4(c+d x) \, dx\\ &=-\frac{b \cos ^4(c+d x)}{4 d}+\frac{a \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac{1}{4} (3 a) \int \cos ^2(c+d x) \, dx\\ &=-\frac{b \cos ^4(c+d x)}{4 d}+\frac{3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac{a \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac{1}{8} (3 a) \int 1 \, dx\\ &=\frac{3 a x}{8}-\frac{b \cos ^4(c+d x)}{4 d}+\frac{3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac{a \cos ^3(c+d x) \sin (c+d x)}{4 d}\\ \end{align*}

Mathematica [A]  time = 0.0920675, size = 62, normalized size = 0.95 \[ \frac{3 a (c+d x)}{8 d}+\frac{a \sin (2 (c+d x))}{4 d}+\frac{a \sin (4 (c+d x))}{32 d}-\frac{b \cos ^4(c+d x)}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4*(a + b*Tan[c + d*x]),x]

[Out]

(3*a*(c + d*x))/(8*d) - (b*Cos[c + d*x]^4)/(4*d) + (a*Sin[2*(c + d*x)])/(4*d) + (a*Sin[4*(c + d*x)])/(32*d)

________________________________________________________________________________________

Maple [A]  time = 0.04, size = 52, normalized size = 0.8 \begin{align*}{\frac{1}{d} \left ( -{\frac{b \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{4}}+a \left ({\frac{\sin \left ( dx+c \right ) }{4} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\cos \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*(a+b*tan(d*x+c)),x)

[Out]

1/d*(-1/4*b*cos(d*x+c)^4+a*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c))

________________________________________________________________________________________

Maxima [A]  time = 2.31804, size = 82, normalized size = 1.26 \begin{align*} \frac{3 \,{\left (d x + c\right )} a + \frac{3 \, a \tan \left (d x + c\right )^{3} + 5 \, a \tan \left (d x + c\right ) - 2 \, b}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

1/8*(3*(d*x + c)*a + (3*a*tan(d*x + c)^3 + 5*a*tan(d*x + c) - 2*b)/(tan(d*x + c)^4 + 2*tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

Fricas [A]  time = 1.81161, size = 127, normalized size = 1.95 \begin{align*} -\frac{2 \, b \cos \left (d x + c\right )^{4} - 3 \, a d x -{\left (2 \, a \cos \left (d x + c\right )^{3} + 3 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/8*(2*b*cos(d*x + c)^4 - 3*a*d*x - (2*a*cos(d*x + c)^3 + 3*a*cos(d*x + c))*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \cos ^{4}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*(a+b*tan(d*x+c)),x)

[Out]

Integral((a + b*tan(c + d*x))*cos(c + d*x)**4, x)

________________________________________________________________________________________

Giac [B]  time = 1.52752, size = 575, normalized size = 8.85 \begin{align*} \frac{12 \, a d x \tan \left (d x\right )^{4} \tan \left (c\right )^{4} + 24 \, a d x \tan \left (d x\right )^{4} \tan \left (c\right )^{2} + 24 \, a d x \tan \left (d x\right )^{2} \tan \left (c\right )^{4} - 5 \, b \tan \left (d x\right )^{4} \tan \left (c\right )^{4} - 20 \, a \tan \left (d x\right )^{4} \tan \left (c\right )^{3} - 20 \, a \tan \left (d x\right )^{3} \tan \left (c\right )^{4} + 12 \, a d x \tan \left (d x\right )^{4} + 48 \, a d x \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + 6 \, b \tan \left (d x\right )^{4} \tan \left (c\right )^{2} + 32 \, b \tan \left (d x\right )^{3} \tan \left (c\right )^{3} + 12 \, a d x \tan \left (c\right )^{4} + 6 \, b \tan \left (d x\right )^{2} \tan \left (c\right )^{4} - 12 \, a \tan \left (d x\right )^{4} \tan \left (c\right ) + 24 \, a \tan \left (d x\right )^{3} \tan \left (c\right )^{2} + 24 \, a \tan \left (d x\right )^{2} \tan \left (c\right )^{3} - 12 \, a \tan \left (d x\right ) \tan \left (c\right )^{4} + 24 \, a d x \tan \left (d x\right )^{2} + 3 \, b \tan \left (d x\right )^{4} + 24 \, a d x \tan \left (c\right )^{2} - 36 \, b \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + 3 \, b \tan \left (c\right )^{4} + 12 \, a \tan \left (d x\right )^{3} - 24 \, a \tan \left (d x\right )^{2} \tan \left (c\right ) - 24 \, a \tan \left (d x\right ) \tan \left (c\right )^{2} + 12 \, a \tan \left (c\right )^{3} + 12 \, a d x + 6 \, b \tan \left (d x\right )^{2} + 32 \, b \tan \left (d x\right ) \tan \left (c\right ) + 6 \, b \tan \left (c\right )^{2} + 20 \, a \tan \left (d x\right ) + 20 \, a \tan \left (c\right ) - 5 \, b}{32 \,{\left (d \tan \left (d x\right )^{4} \tan \left (c\right )^{4} + 2 \, d \tan \left (d x\right )^{4} \tan \left (c\right )^{2} + 2 \, d \tan \left (d x\right )^{2} \tan \left (c\right )^{4} + d \tan \left (d x\right )^{4} + 4 \, d \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + d \tan \left (c\right )^{4} + 2 \, d \tan \left (d x\right )^{2} + 2 \, d \tan \left (c\right )^{2} + d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

1/32*(12*a*d*x*tan(d*x)^4*tan(c)^4 + 24*a*d*x*tan(d*x)^4*tan(c)^2 + 24*a*d*x*tan(d*x)^2*tan(c)^4 - 5*b*tan(d*x
)^4*tan(c)^4 - 20*a*tan(d*x)^4*tan(c)^3 - 20*a*tan(d*x)^3*tan(c)^4 + 12*a*d*x*tan(d*x)^4 + 48*a*d*x*tan(d*x)^2
*tan(c)^2 + 6*b*tan(d*x)^4*tan(c)^2 + 32*b*tan(d*x)^3*tan(c)^3 + 12*a*d*x*tan(c)^4 + 6*b*tan(d*x)^2*tan(c)^4 -
 12*a*tan(d*x)^4*tan(c) + 24*a*tan(d*x)^3*tan(c)^2 + 24*a*tan(d*x)^2*tan(c)^3 - 12*a*tan(d*x)*tan(c)^4 + 24*a*
d*x*tan(d*x)^2 + 3*b*tan(d*x)^4 + 24*a*d*x*tan(c)^2 - 36*b*tan(d*x)^2*tan(c)^2 + 3*b*tan(c)^4 + 12*a*tan(d*x)^
3 - 24*a*tan(d*x)^2*tan(c) - 24*a*tan(d*x)*tan(c)^2 + 12*a*tan(c)^3 + 12*a*d*x + 6*b*tan(d*x)^2 + 32*b*tan(d*x
)*tan(c) + 6*b*tan(c)^2 + 20*a*tan(d*x) + 20*a*tan(c) - 5*b)/(d*tan(d*x)^4*tan(c)^4 + 2*d*tan(d*x)^4*tan(c)^2
+ 2*d*tan(d*x)^2*tan(c)^4 + d*tan(d*x)^4 + 4*d*tan(d*x)^2*tan(c)^2 + d*tan(c)^4 + 2*d*tan(d*x)^2 + 2*d*tan(c)^
2 + d)